package com.me.MyAppleDrop;

import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.me.enums.ScreenEnum;
import com.me.helper.MySkin;
import com.me.helper.SoundManager;
import com.me.screen.ScreenManager;
import com.me.utils.PackerUtils;

public class MainAppleDrop extends Game {
	private static ScreenManager screenManger;
	private static MySkin mySkin;
	private static TextureAtlas atlas;
	private static SoundManager soundManager;

	@Override
	public void create() {
		PackerUtils.initPath();

		atlas = new TextureAtlas( Gdx.files.internal(PackerUtils.PATH_TEXTUREPACKER));
		mySkin = new MySkin();
		screenManger = new ScreenManager();
		soundManager = new SoundManager();

		setScreen(screenManger.createScreen(ScreenEnum.LOADING_SCREEN));
	}

	@Override
	public void dispose() {

	}

	@Override
	public void render() {
		if (screenManger.getScreen() != null)
			screenManger.getScreen().render(Gdx.graphics.getDeltaTime());
	}

	@Override
	public void resize(int width, int height) {

	}

	@Override
	public void pause() {

	}

	@Override
	public void resume() {

	}

	public static TextureAtlas getAtlas() {
		return atlas;
	}

	public static MySkin getMySkin() {
		return mySkin;
	}

	public static ScreenManager getScreenManager() {
		return screenManger;
	}
	
	public static SoundManager getSoundManager() {
		return soundManager;
	}
	
}
